www.gusucode.com > 落叶冰点万能企业网站内容管理系统 V9.1 > 落叶冰点万能企业网站内容管理系统 V9.1\code\admin\adminInfoback\D_admin_infoback_buy.asp
<% '************************************************************** ' 新动软网站管理系统 ' 官方网站: http://www.aspcpu.com ' 系统作者: 阮丁远(网名:天下程序) ' Copyright 新动软网站管理系统 版权所有 '************************************************************** %> <LINK href="../css.css" type=text/css rel=stylesheet> <% dir_set="../../" %> <!--#include file=../../inc/conn.asp--> <!--#include file=../../inc/Functionb.asp--> <!--#include file=../../inc/ajaxLIB.asp--> <!--#include file=../inc/checkadmin2.asp--> <!--#include file=../../inc/functionFiless.asp--> <% sys_content_type=trim(request("sys_content_type")) lanmu_taba="buy" set rs44g=server.CreateObject("adodb.recordset") rs44g.open "select * from ND_channel where sys_content_type_name='"&sys_content_type&"' and lanmu_type='"&lanmu_taba&"'",conn,1,1 if find_dataw(lanmu_taba,rs44g("id"),1)<>"1" and qx_if_max=0 then response.redirect "../D_suodinguser.asp" end if '获取自身文件名 aryxx =split(Request.ServerVariables("SCRIPT_NAME"),"/") fileNamexx = aryxx(ubound(aryxx)) strFileName=fileNamexx function JoinChar(strUrl) if strUrl="" then JoinChar="" exit function end if if InStr(strUrl,"?")<len(strUrl) then if InStr(strUrl,"?")>1 then if InStr(strUrl,"&")<len(strUrl) then JoinChar=strUrl & "&" else JoinChar=strUrl end if else JoinChar=strUrl & "?" end if else JoinChar=strUrl end if end function count=15 '每页留言数 action=request.querystring("action") id=request.querystring("id") rid=request.querystring("rid") url=Request.ServerVariables("HTTP_REFERER") if instr(1,url,"sys_content_type=",1)=0 then url=JoinChar(url) url=url&"sys_content_type"&"="&sys_content_type&"&isgub="&request("isgub") end if jp="! 2秒后返回<a href="&url&">"&url&"</a><meta http-equiv=refresh content=2;URL="&url&">" function nh(fs) if not isnull(fs) then fs=replace(fs,">",">") fs=replace(fs,"<","<") fs=Replace(fs,CHR(32)," ") fs=Replace(fs,CHR(9)," ") fs=Replace(fs,CHR(34),""") fs=Replace(fs,CHR(39),"'") fs=Replace(fs,CHR(13),"") fs=Replace(fs,CHR(10) & CHR(10),"</P><P> ") fs=Replace(fs,CHR(10),"<BR> ") nh=fs end if end function function ck() end function select case action case "del" ck if id<>"" then conn.execute("DELETE FROM [ND_book] WHERE id="&id) conn.execute("DELETE FROM [ND_reply] WHERE bid="&id) response.write"该留言删除成功"&jp&"" end if case "delr" ck if rid<>"" then conn.execute("DELETE FROM [ND_reply] WHERE rid="&rid) response.write"该回复删除成功"&jp&"" end if case "add" name=nh(trim(request.form("username"))) content=nh(request.form("usercontent")) face=nh(request.form("userface")) qq=nh(request.form("userqq")) email=nh(request.form("useremail")) home=nh(request.form("userhome")) ip=request.servervariables("remote_addr") if name="" or content="" then response.write"姓名、内容必须填写"&jp&"" else conn.execute("INSERT INTO [ND_book](sys_content_type,name,content,face,qq,email,home,ip) VALUES('"&sys_content_type&"','"&name&"','"&content&"','"&face&"','"&qq&"','"&email&"','"&home&"','"&ip&"')") response.write"留言添加成功"&jp&"" end if case "reply" name=nh(trim(request.form("rname"))) contentqq=nh(request.form("rcontent")) ip=request.servervariables("remote_addr") if (session(nd_admin_cach_varb_name)<>"" or request.cookies(nd_admin_cach_varb_name)<>"") and id<>"" then conn.execute("UPDATE [ND_book] SET hfcontent='"&contentqq&"',hftime='"&now()&"' WHERE id="&id) response.write"站长回复成功"&jp&"" ElseIf name="" or contentqq="" Then response.write"姓名、内容必须填写"&jp&"" else conn.execute("INSERT INTO [ND_reply](sys_content_type,rname,rcontent,bid,rip) VALUES('"&sys_content_type&"','"&name&"','"&contentqq&"','"&id&"','"&ip&"')") response.write"回复成功"&jp&"" end if case "login" un=nh(request.form("username")) pw=nh(request.form("password")) if session(nd_admin_cach_varb_name)<>"" or request.cookies(nd_admin_cach_varb_name)<>"" then response.write"登录成功"&jp&"" else response.write"用户名或密码错误"&jp&"" end if case "logout" session(nd_admin_cach_varb_name)="" response.cookies(nd_admin_cach_varb_name)="" response.write"己成功退出"&jp&"" case else %><html> <head> <meta http-equiv="Content-Type" content="text/html; charset=gb2312"> <title>admin</title> <style> a:link{text-decoration:none;color:#1C5F82} a:visited{text-decoration:none;color:#1C5F82} a:hover{text-decoration:underline overline;color:#995500} td{font-size:9pt;} </style> </head> <body bgcolor=#eef8fa style="font-size:9pt;"> <center> <div id=la></div> <% set rs=server.createobject("adodb.recordset") rs.open "select * from [ND_book] where sys_content_type='"&sys_content_type&"' and tttype='2' Order By time Desc",conn,1,1 if rs.recordcount=0 then response.write"<textarea id=lb style='position:absolute;visibility:hidden;'></textarea><br><br><br><br><br>还没有任何数据.." else rs.pagesize=count pagexx=request.QueryString("page") if pagexx<>"" then pagexx=clng(pagexx) if pagexx="" or pagexx=0 then pagexx=1 rs.absolutepage=pagexx %> <textarea id=lb style="position:absolute;visibility:hidden;"> 共<%=rs.recordcount%>条,当前显示第<%=rs.recordcount-(pagexx-1)*count%>条至<% if rs.recordcount-pagexx*count+1>0 then response.write""&rs.recordcount-pagexx*count+1&"" else response.write"1" end if %>条,每页<%=count%>条,共<%=rs.pagecount%>页,跳至第<select name="ss" onChange="window.location=options[selectedIndex].value;" size="1"> <%for i=1 to rs.pagecount%><option value="<%=strFileName%>?page=<%=i%><%="&"%>sys_content_type=<%=sys_content_type%>&isgub=<%=request("isgub")%>"<%if pagexx=i then response.write"selected"%>><%=rs.pagecount-i+1%></option> <%next%></select>页 </textarea> <% num=rs.recordcount-pagexx*count+1 do while not rs.eof and count>0 count=count-1 %> <table width=600 border=1 cellpadding=0 cellspacing=0 bordercolor=#76a9dC style="border-collapse:collapse"> <tr> <td width=150>->第<%=num+count%>条<-</td> <td width=380> <%if request("isgub")="1" then%> QQ:<%=rs("qq")%><%if rs("qq")="" then response.write" *^_^*"%> email:<%=rs("email")%><%if rs("email")="" then response.write" *^_^*"%> homepage:<%=rs("home")%><%if rs("home")="" then response.write" *^_^*"%> <%end if%> </td> <td width=70 align=center> </td> </tr> <tr> <td valign=top align=center><span STYLE="width:100;font-size:12px;filter:glow(Color=#b0c8dd,Strength=15);"><img src=<%=rs("face")%>><br><%=rs("name")%></span> </td> <td colspan=2 valign=top><div style="BORDER:#777777 2px solid;BORDER-TOP:#d6d3ce 2px solid;BORDER-left:#d6d3ce 2px solid;background-color:#eaf4f6;"><img src=images/say.gif><%=rs("content")%><BR>留言时间:<%=rs("time")%></div> <%if session(nd_admin_cach_varb_name)<>"" or request.cookies(nd_admin_cach_varb_name)<>"" then %> <hr size=1 color=#AFCAE4> IP:<%=rs("ip")%> <%if request("isgub")="1" then%> <A href="javascript:cd(zzhf<%=rs("id")%>)">站长回复</a> <%else%> <A href="javascript:cd(zzhf<%=rs("id")%>)">管理员回复</a> <%end if%> <a href='<%=strFileName%>?action=del&id=<%=rs("id")%>' onClick="{if(confirm('要删除这条吗?')){return true;}return false;}">删除</a> <hr size=1 color=#AFCAE4> <span id="zzhf<%=rs("id")%>" style="display:none"> <form name="form" method="POST" action="<%=strFileName%>?action=reply&id=<%=rs("id")%><%="&"%>sys_content_type=<%=sys_content_type%>&isgub=<%=request("isgub")%>"> <textarea name="rcontent" cols="27" rows="4"></textarea><input type="submit" name="Submit" value="站长回复">(要删除站长回复用空回复) </form> </span> <%end if%> <%if rs("hfcontent")<>"" then response.write" --> <font color=#0066FF>站长回复:</font>"&rs("hfcontent")&"<br><img src=images/hftime.gif>回复时间:"&rs("hftime")&"<hr size=1 color=#AFCAE4>" end if%> <% set rsr=server.createobject("adodb.recordset") rsr.open "select * from [ND_reply] where bid="&rs("id")&" Order By rtime asc",conn,1,1 do while not rsr.eof %> --> 网友"<font color=#0066FF><%=rsr("rname")%></font>"回复:<%=rsr("rcontent")%>(回复时间:<%=rsr("rtime")%>) <%if session(nd_admin_cach_varb_name)<>"" or request.cookies(nd_admin_cach_varb_name)<>"" then %> IP:<%=rsr("rip")%> <a href="<%=strFileName%>?action=delr&rid=<%=rsr("rid")%>" onClick="{if(confirm('要删除该回复吗?')){return true;}return false;}">删除回复</a> <%end if%> <% rsr.movenext if not rsr.eof then response.write"<hr size=1 color=#AFCAE4>" loop set rsr=nothing %> <span id="ly<%=rs("id")%>" style="display:none"> <hr size=1 color=#AFCAE4> <form name="form" method="POST" action="<%=strFileName%>?action=reply&id=<%=rs("id")%><%="&"%>sys_content_type=<%=sys_content_type%>&isgub=<%=request("isgub")%>"> 姓名:<input type="text" name="rname" size="15"> 给"<font color=#0066FF><%=rs("name")%></font>"的回复 <BR> 内容:<textarea name="rcontent" cols="40" rows="3"></textarea><br> <input type="submit" name="Submit" value="提交"> </form> </span> </td> </tr> </table> <% rs.movenext if count>0 and not rs.eof then response.write"<br>" loop rs.close set rs=nothing %> <%end if%> <div id=lc></div> </center> <script> function cd(bn) { if (bn.style.display==""){bn.style.display="none"} else {bn.style.display=""} } la.innerHTML=lc.innerHTML=lb.value; </script> </body> </html> <%end select%>